package com.feature.core.constant;

/**
 * 权限相关通用常量
 * 
 */
public class SecurityConstants {
    /**
     * 用户ID字段
     */
    public static final String USER_ID_KEY = "userId";
    public static final String LOGIN_USER_KEY = "loginUser";

    /**
     * 令牌自定义标识
     */
    public static final String AUTHENTICATION = "Authorization";

    /**
     * 令牌前缀
     */
    public static final String PREFIX = "Bearer ";

    /**
     * 令牌秘钥
     */
    public final static String SECRET = "Y29tLmZlYXR1cmUuc2hvcA==";

    public final static long ACCESS_TOKEN_EXPIRE_TIME = 2 * 24 * 3600 * 1000;
    public final static long REFRESH_TOKEN_EXPIRE_TIME = 7 * 24 * 3600 * 1000;
    public final static long USER_EXPIRE_TIME = ACCESS_TOKEN_EXPIRE_TIME + 3600 * 1000;

    public final static String FROM_SOURCE_REQUEST_HEAD = "from-source";

    public final static String FROM_SOURCE_OUTER = "outer";

}
